<template>
  <van-row type="flex" align="center" @click="handleClick(item)">
    <van-col :span="23">
      <div class="L-text L-bold" v-html="item.title"></div>
      <div v-if="item.value">
        <span class="L-secondary-text-color L-small-text" v-html="item.value"></span>
      </div>
      <template v-if="item.label">
        <div class="L-secondary-text-color L-small-text" v-html="item.label"></div>
      </template>
    </van-col>
    <van-col :span="1">
      <i class="iconfont icon-jiufuqianbaoicon07"></i>
    </van-col>
  </van-row>

</template>

<script setup lang="ts">
import { onMounted, ref, defineProps } from "vue";
import { useRouter, useRoute } from "vue-router";
import emitter from "@/utils/emitter";

const router = useRouter();
const route = useRoute();

import { useCheck } from "@/hooks/hooks.js";
const { checkCustomized } = useCheck();

const props = defineProps({
  item: {
    type: Object,
    default: {},
  },
  idobject: {
    type: String,
    default: "",
  },
  mode: {
    type: String,
    default: "page",
  },
  handleShowDetail:{
    type: Function,
    default: ()=>{},

  }
});

function handleClick() {

  const { item, idobject, mode } = props;
  // console.log("item",item,idobject,item[`${idobject}_id`])
  props.handleShowDetail(item[`${idobject}_id`])
  // const path = checkCustomized(`/${props.idobject}Card`)
  //   ? `/${props.idobject}Card`
  //   : "defaultCard";

  //   router.push({
  //     path: path,
  //     query: {
  //       itemid: item[`${idobject}_id`],
  //       idobject,
  //       prepagetab:idobject
  //     },
  //   });
  // if (mode === "page") {
    
  // }else{
  //   emitter.emit("showDetailPopup",item)
  // }
}
</script>

<style scoped>
</style>